<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Axios Demo</title>
</head>
<body>

</body>
<!--<script src="js/axios-0.18.0.js"></script>-->
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script>
    let jsObject = {name: "zhangsan"};
    axios({
        method: "post",
        url: "http://localhost:8080/web_18_axios/axiosServletGet",
        // data: JSON.stringify(jsObject)
        data:jsObject //这里 axios 会将该js对象转换为json串
    }).then(function (resp) {
        alert(resp.data)
    })
</script>
</html>